/*
 * @Author       : wfl
 * @LastEditors  : wfl
 * @description  :
 * @updateInfo   :
 * @Date         : 2023-06-30 16:35:54
 * @LastEditTime : 2023-07-12 10:38:06
 */
/*
 * @Author: ww
 * @Date: 2023-05-19 16:12:38
 * @LastEditors: ww
 * @LastEditTime: 2023-06-20 16:51:10
 * @FilePath: \iking-workflow\src\api\ApiMoudle\approval.ts
 */
import { ikHttp } from '@g/api/request'
export const approvalApi = {
  // 列表数据
  getListData: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/page', param),
  getDetailData: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/detail/id', param, {
      headers: {
        'Content-Type': 'application/text;charset=UTF-8'
      }
    }),
  passApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/pass', param),
  cancelApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/update/cancel', param),
  revokeApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/revoke', param),
  remindApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/remind', param),
  commentApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/comment', param),
  rejectApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/reject', param),
  backApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/back', param),
  appendApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/append', param),
  executedNode: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/executed-node/list/id', param, {
      headers: {
        'Content-Type': 'application/text;charset=UTF-8'
      }
    }),
  resubmitApproval: async (param?: any) =>
    await ikHttp.post('/server/approve/form/instance/re-submit', param),
  // 标记为已读
  handReaded: async (param?: any) => await ikHttp.post('/server/approve/form/instance/carbon-copy/read', param)
}
